import { Navigate } from "react-router-dom";


const getToken = () => {
    return sessionStorage.getItem("token");
}


function Aguel({childr}) {
    let token = getToken();
    if (token) {
        return childr
    }else{
        return <Navigate to='/login'></Navigate>
    }
    
}

export default Aguel;